import React from "react";
import { HashRouter as Router, Route, Switch } from "react-router-dom";
import asyncComponent from './AsyncComponent' ;
import './App.scss' ;
import './styles/common.scss' ;

import Header from './component/header/header' ;
import Footer from './component/footer/footer' ;
// import Electronicmap from "./containers/Electronicmap/Electronicmap";
// import Talentpolicy from "./containers/Talentpolicy/Talentpolicy";
// import TalentClub from "./containers/TalentClub/TalentClub";

const AsyncHome = asyncComponent(() => import("./containers/Home/Home"));
const AsyncJobhunting = asyncComponent(() => import("./containers/Jobhunting/Jobhunting"));
const AsyncVocationaltraining = asyncComponent(() => import("./containers/Vocationaltraining/Vocationaltraining"));
const AsyncpersonnelAssessment = asyncComponent(() => import("./containers/personnelAssessment/personnelAssessment"));
const AsyncPersonneldeclaration = asyncComponent(() => import("./containers/Personneldeclaration/Personneldeclaration"));
const AsyncElectronicmap = asyncComponent(() => import("./containers/Electronicmap/Electronicmap"));
const AsyncOfficehall = asyncComponent(() => import("./containers/Officehall/Officehall"));
const AsyncTalentpolicy = asyncComponent(() => import("./containers/Talentpolicy/Talentpolicy"));
const AsyncTalentClub = asyncComponent(() => import("./containers/TalentClub/TalentClub"));
const AsyncTalentRecruitment = asyncComponent(() => import("./containers/TalentRecruitment/TalentRecruitment"));
const AsyncCompanyInfo = asyncComponent(() => import("./containers/CompanyInfo/CompanyInfo"));
const AsyncTalentNews = asyncComponent(() => import("./containers/TalentNews/TalentNews"));
const AsyncCompanyService = asyncComponent(() => import("./containers/CompanyService/CompanyService"));


const Asynclogin = asyncComponent(() => import("./containers/login/login"));
const Asyncregis = asyncComponent(() => import("./containers/regis/regis"));
const AsyncNotfound = asyncComponent(() => import("./containers/Notfound"));

class App extends React.Component{
    componentDidMount(){
    }
    render(){
        return(
            <Router
                // basename={`haha`}
            >
                <div>
                    <Header/>
                    <Switch>
                        <Route exact path="/" component={AsyncHome} />
                        <Route path="/Jobhunting" component={AsyncJobhunting} />
                        <Route path="/Vocationaltraining" component={AsyncVocationaltraining} />
                        <Route path="/personnelAssessment" component={AsyncpersonnelAssessment} />
                        <Route path="/Personneldeclaration" component={AsyncPersonneldeclaration} />
                        <Route path="/Electronicmap" component={AsyncElectronicmap} />
                        <Route path="/Officehall" component={AsyncOfficehall} />
                        <Route path="/Talentpolicy" component={AsyncTalentpolicy} />
                        <Route path="/TalentClub" component={AsyncTalentClub} />

                        <Route path="/TalentRecruitment" component={AsyncTalentRecruitment} />
                        <Route path="/CompanyInfo" component={AsyncCompanyInfo} />
                        <Route path="/TalentNews" component={AsyncTalentNews} />
                        <Route path="/CompanyService" component={AsyncCompanyService} />


                        <Route path="/login" component={Asynclogin} />
                        <Route path="/regis" component={Asyncregis} />
                        <Route component={AsyncNotfound} />
                    </Switch>
                    <Footer/>
                </div>
            </Router>
        )
    }
}



export default App;